package com.umgsai.thread.thread18;

public class PublicClass {
	static String username;
	static String password;
	
	static class PrivateClass{
		private String age;
		private String address;
		public String getAge() {
			return age;
		}
		public void setAge(String age) {
			this.age = age;
		}
		public String getAddress() {
			return address;
		}
		public void setAddress(String address) {
			this.address = address;
		}
		public void printPublicProperty() {
			System.out.println(username + "-" + password);
		}
	}
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public static void main(String[] args) {
		PublicClass publicClass = new PublicClass();
		publicClass.setUsername("admin");
		publicClass.setPassword("123456");
		System.out.println(publicClass.getUsername() + "-" + publicClass.getPassword());
		
		PrivateClass privateClass = new PrivateClass();
		privateClass.setAddress("shanghai");
		privateClass.setAge("25");
		System.out.println(privateClass.getAddress() + "-" + privateClass.getAge());
		privateClass.printPublicProperty();
	}
}
